package com.sl.ms.trade.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sl.ms.trade.entity.RefundRecordEntity;
import com.sl.ms.trade.enums.RefundStatusEnum;
import com.sl.ms.trade.mapper.RefundRecordMapper;
import com.sl.ms.trade.service.RefundRecordService;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
 * @author wjh
 * @create 2023-09-24 14:03
 */
@Service
public class RefundRecordServiceImpl extends ServiceImpl<RefundRecordMapper, RefundRecordEntity> implements RefundRecordService {
    @Override
    public RefundRecordEntity findByRefundNo(Long refundNo) {
        return null;
    }

    @Override
    public List<RefundRecordEntity> findListByTradingOrderNo(Long tradingOrderNo) {
        LambdaQueryWrapper<RefundRecordEntity> queryWrapper = Wrappers.<RefundRecordEntity>lambdaQuery().eq(RefundRecordEntity::getTradingOrderNo, tradingOrderNo)
                .orderByDesc(RefundRecordEntity::getCreated);
        return super.list(queryWrapper);
    }

    @Override
    public List<RefundRecordEntity> findListByProductOrderNo(Long productOrderNo) {
        return null;
    }

    @Override
    public List<RefundRecordEntity> findListByRefundStatus(RefundStatusEnum refundStatus, Integer count) {
        return null;
    }

}
